package com.czw.ddm.register

import cn.jiguang.share.android.api.JShareInterface
import cn.jiguang.share.android.api.PlatformConfig
import com.didi.drouter.annotation.Service
import com.mtzqc.common.app.App
import com.mtzqc.common.init.InitService

@Service(
    function = [InitService::class],
    priority = 40
)
class ShareRegister : JGRegister(), InitService {
    override val depName: String
        get() = "JShare"

    override fun initOnAgree(): Boolean {
        JShareInterface.setDebugMode(App.isDev() || App.isDebug())

        val config = PlatformConfig()
            .setWechat("wxa7da3a99a2a6b6ed", "efb871b32cbf46ca82fecb75bd72386d")
            .setQQ("101912127", "31a653f75ddbefeafadfe394c31c37a5")
            .setSinaWeibo(
                "3591004520",
                "fea28430023dc31e0d8baad14dc9a623",
                "https://www.jiguang.cn"
            )
        JShareInterface.init(App.app(), config)
        return true
    }
}